import Vue from 'vue'
import VueRouter from 'vue-router'
import App from './App.vue'
import router from './router'
import store from './store'
import Storage from 'vue-ls'
import './utils/rem'

import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'

import '@/icons' // icon
import '@/permission'

// import * as fundebug from 'fundebug-javascript'
// import FundebugVue from 'fundebug-vue'
// fundebug.apikey = '0d6b06c2149816c458d9affda6f1aa880b53b5536a53983492412a6dade1cbb4'
// new FundebugVue(fundebug).installVueErrorHandler(Vue) // Vue 2.x

// if (process.env.NODE_ENV === 'development') {
//   const { mockXHR } = require('../mock')
//   mockXHR()
// }
const { mockXHR } = require('../mock')
mockXHR()

Vue.config.productionTip = false
Vue.use(Antd)

const options = {
  namespace: 'vuejs__', // key键前缀
  name: 'ls', // 命名Vue变量.[ls]或this.[$ls],
  storage: 'session', // 存储名称: session, local, memory
}

Vue.use(Storage, options)
Vue.use(VueRouter)

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
